Climate model projections suggest major North American biome shifts in response to anthropogenic climate change (Rehfeldt et al. 2012). Such shifts could have profound influences on native flora and fauna, many of which would have to move long distances to track their climatic niches. To evaluate potential ecosystem changes at a somewhat finer scale, I projected the change in climate space for level III ecoregions (Commission for Environmental Cooperation 1997) as surrogates for multiple associated species and ecological communities. First, I developed a random forest model (Breiman 2001) to predict ecoregion class from bioclimatic variables, using 1-km interpolated climate data for the 1969-1990 normal period (Wang et al. 2016),available at adaptwest.databasin.org.
R Code for this portion follows:
library(randomForest)
library(raster)
#eco = project directory
setwd(eco)
datlcc = read.csv("CECEcoregionSampleLCC.csv")
cececo = read.csv("CECecoregions.csv")
ecolevel3s <- read.csv("NA_CEC_Eco_Level3_LCC.shp")
#ecolevel3r = ecoregion raster with a Lambert azimuthal equal-area projection ("ceclev3idlaz.tif")
#lazea <- CRS("+proj=laea +lat_0=45 +lon_0=-100 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0")
LCC <- CRS("+proj=lcc +lat_1=49 +lat_2=77 +lat_0=0 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs")
#coordinates(datlaz) <- c("X", "Y")
#proj4string(datlaz) <- CRS("+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0")
#cur = directory containing grids representing derived climate variables
setwd(cur)
clim <- list.files(cur, pattern =".asc$")
curclim<-stack(clim)
temp <- raster(clim[1])
ID <- as.data.frame(rasterToPoints(temp))
names(ID)[3] <- "ID4km"
ID$ID <- row.names(ID)
IDR <- raster(ncols=ncol(temp), nrows=nrow(temp), xmn=xmin(temp), xmx=xmax(temp), ymn=ymin(temp), ymx=ymax(temp))
IDRR <- rasterize(as.matrix(ID[,1:2]), IDR, as.numeric(ID[,4]))
curclim <- addLayer(curclim,IDRR)
setwd(eco)
sampleclim<-cbind(datlcc,extract(curclim,as.matrix(cbind(datlcc[,3],datlcc[,4]))))
sc <- na.omit(sampleclim)
names(sc)[ncol(sc)] <- "IDgrid"
sc$NA_L3CODE <- as.factor(as.character(sc$NA_L3CODE))
lu <- as.data.frame(levels(sc$NA_L3CODE))
lu$level <- row.names(lu)
names(lu)[1] <- "NA_L3CODE"
write.csv(lu,file="ecoregionlu.csv",row.names=FALSE)
eco.rf <- randomForest(y=sc$NA_L3CODE, x=sc[,5:(ncol(sc)-1)],importance = TRUE, proximity = TRUE, data=sc)
#eco1.rf <- randomForest(y=sc$NA_L3CODE, x=sc[,5:23],importance = TRUE, proximity = TRUE, data=sc)
round(importance(eco.rf), 2)
varImpPlot(eco.rf)
ecocurr <- predict(curclim,eco.rf)
projection(ecocurr) <- LCC
#ecocurrlaz <- round(projectRaster(ecocurr, ecolevel3r, method='ngb'),0)
writeRaster(ecocurr,filename="currentlcc.tif",datatype='INT4S',format="GTiff",overwrite=TRUE)
curfreq <- freq(ecocurr)
ecolu <- merge(lu,curfreq,by.x="level",by.y="value")
names(ecolu)[3] <- "curr"
This model was then used to project ecoregions onto future mid-century (2041-2070) and end-of-century (2071-2100) climate conditions. Climate projections were based on 1-km downscaled climate anomalies (Wang et al. 2016) generated by an ensemble of 15 widely-used GCMs from the Coupled Model Intercomparison Project, Phase 5 (CMIP5, Taylor et al. 2012), available at adaptwest.databasin.org. I used representative concentration pathway (RCP) 8.5, to represent the 21st century conditions that are to be expected without dramatic reductions in greenhouse gas emissions or technological fixes (Fuss et al. 2014). I also evaluated RCP 4.5 to represent a future in which significant emissions reductions are achieved.
The following code generates projections for each representative and time period:
fut = directory containing grids representing derived future climate variables
rcp <- c("rcp45","rcp85")
time <- c("2050s","2080s")
for (j in rcp) {
for (k in time) {
w <- paste(fut,"NA_ENSEMBLE_",j,"_",k,"_Bioclim_ASCII/",sep="")
setwd(w)
futclim <- list.files(w,pattern=".asc$")
s <-stack(futclim)
p <- predict(s,eco.rf)
projection(p) <- LCC
futfreq <- as.data.frame(freq(p))
names(futfreq)[2] <- paste(i,j,sep="_")
ecolu <- merge(ecolu,futfreq,by.x="level",by.y="value")
writeRaster(p, filename=paste(eco,"pred",j,k,sep="_"),datatype='INT4S',format="GTiff", overwrite=TRUE)
}
}
Results for RCP 4.5 and RCP 8.5 are shown in Figures 1 and 2, respectively:
Figure 1. Model-predicted (a) baseline, (b) mid-century, and (c) end-of-century changes in North American ecoregions for RCP 4.5. Boreal, hemi-boreal, and western forested regions are shown in green and blue-green shades; arctic ecoregions are in blue shades; prairie/parkland ecoregions are in brown shades; and temperate forest ecoregions are in yellow and orange shades (see Table 1 for full list of ecoregions). Boreal ecoregions are also outlined in black.